async function loadScript(url, callback) {
    return new Promise((resolve) => {
        var script = document.createElement("script")
        script.type = "text/javascript";


        script.onload = function () {
            if (callback) callback();

            resolve();
        };

        script.src = url;

        document.body.appendChild(script);
    })

}

export default loadScript;
